]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
lightbox: GLSL requires real numbers, not integers
authorDaniel van Vugt <daniel.van.vugt@canonical.com>
Tue, 25 Jan 2022 09:06:49 +0000 (17:06 +0800)
committerMarge Bot <marge-bot@gnome.org>
Tue, 25 Jan 2022 15:38:04 +0000 (15:38 +0000)
At least backward-compatible GLSL requires real numbers only. It's a
fatal shader compilation error to use integers in GLES and older GL
versions like that of i915.

Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2115
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2125>

js/ui/lightbox.js

index cf68ea828c4be2c4dfc9e6a042c269bc8d1e16d9..08bf5641d25680b8205254a9f10686980c2311f3 100644 (file)
@@ -20,7 +20,7 @@ vec2 position = cogl_tex_coord_in[0].xy - 0.5;\n\
 float t = length(2.0 * position);\n\
 t = clamp(t, 0.0, 1.0);\n\
 float pixel_brightness = mix(1.0, 1.0 - vignette_sharpness, t);\n\
-cogl_color_out.a = cogl_color_out.a * (1 - pixel_brightness * brightness);';
+cogl_color_out.a = cogl_color_out.a * (1.0 - pixel_brightness * brightness);';
 
 var RadialShaderEffect = GObject.registerClass({
     Properties: {